package com.cola.Comparable;

import java.util.Comparator;

/**
 * @Grup:com.cola.Comparable
 * @Auther:cola
 * @Data:2021/3/16-2021-03-16:18
 * @version:1.0
 */
public class DogComparator implements Comparator<Dog> {

    @Override
    public int compare(Dog o1, Dog o2) {
        return o1.getAge()-o2.getAge();
    }
}
